$baseConfig = [ 'class' => JobQueueDBSingle::class ];
}
$baseConfig['type'] = 'null';
- $baseConfig['wiki'] = wfWikiID();
+ $baseConfig['domain'] = WikiMap::getCurrentWikiDbDomain()->getId();
+ $baseConfig['stash'] = new HashBagOStuff();
+ $baseConfig['wanCache'] = new WANObjectCache( [ 'cache' => new HashBagOStuff() ] );
$variants = [
'queueRand' => [ 'order' => 'random', 'claimTTL' => 0 ],
'queueRandTTL' => [ 'order' => 'random', 'claimTTL' => 10 ],
$this->markTestSkipped( $desc );
}
$this->assertEquals( wfWikiID(), $queue->getWiki(), "Proper wiki ID ($desc)" );
+ $this->assertEquals(
+ WikiMap::getCurrentWikiDbDomain()->getId(),
+ $queue->getDomain(),
+ "Proper wiki ID ($desc)" );
}
/**
protected function getDB( $index ) {
$lb = MediaWikiServices::getInstance()->getDBLoadBalancer();
// Override to not use CONN_TRX_AUTOCOMMIT so that we see the same temporary `job` table
- return $lb->getConnection( $index, [], $this->wiki );
+ return $lb->getConnection( $index, [], $this->domain );
}
}